
import * as THREE from "three"
import { OBJECTS, PLAYERS, UTILS } from "../declarations.js"


let lights, groups

let LIGHT = {
  init: () => {

    lights = OBJECTS.lights
    groups = OBJECTS.groups

    // const point0 = new THREE.PointLight(0xffffff, 2, 2)



    // actors.car.add(point0)

    // lights.ambientLight = new THREE.AmbientLight(0x404040, 1)
    // lights.hemiLight = new THREE.HemisphereLight(new THREE.Color(1,0,0), 0xffffff, 1 )
    // lights.spot = new THREE.SpotLight(new THREE.Color(1,1,1),2,0,90)
    // lights.spot.position.set(-20,20,-30)

    lights.sun = new THREE.DirectionalLight(0xffffff, 1.5)
    lights.sun.castShadow = true

    // lights.sun.shadow.mapSize.width = 512; // default
    // lights.sun.shadow.mapSize.height = 512; // default
    // lights.sun.shadow.camera.near = 0.01; // default
    // lights.sun.shadow.camera.far = 20; // default

    // lights.sun.position.set( 0, 30, 0 );
    // lights.sun.lookAt(new THREE.Vector3(0,0,0))

    // lights.sunhelper = new THREE.DirectionalLightHelper(lights.sun)

    // groups.lights.add(ambientLight)
    // lights.sun = new THREE.HemisphereLight
    
  },

  
}

export { LIGHT }
